<template>
  <div>
    <h1>组件通信</h1>
    <span class="myred">说明:组件是嵌套组件关系,provider放到父组件,inject放到子组件</span>
    message: {{ message }}
    <GrandPa></GrandPa>

  </div>
</template>

<script>

import GrandPa from './components/GrandPaView'

export default {
  provide () {
    return {
      message2: this.message
    };
  },
  components: { GrandPa },
  props: {},
  data () {
    return {
      message: '我是父组件信息'
    }
  },
  computed: {},
  methods: {

  },
  created () {

  },
  mounted () {

  },
}
</script>
<style scoped></style>
